package khfx.service.common.impl;

import java.util.List;

import javax.annotation.Resource;

import khfx.dao.common.SelectGroupBalanceDao;
import khfx.dao.db.Session;
import khfx.dao.db.StoreManager;
import khfx.domain.common.GroupBalanceSelectVo;
import khfx.service.common.SelectGroupBalanceService;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
@Component("SelectGroupBalanceService")
public class SelectGroupBalanceServiceImpl implements SelectGroupBalanceService {
	
	private final Logger logger = Logger.getLogger(SelectGroupBalanceServiceImpl.class);
	@Resource SelectGroupBalanceDao selectGroupBalanceDao;
	
	public List<GroupBalanceSelectVo> selectGroupBalance(Integer reportDate){
		List<GroupBalanceSelectVo> list = null;
		Session session = null;
		try{
			session = StoreManager.openSession();
			list = selectGroupBalanceDao.selectGroupBalance(session, reportDate);
		}catch(Exception e){
			logger.error(e);
		}finally{
			StoreManager.closeSession(session);
		}
		return list;
	}

}
